package midi.patterns;

import midi.IntervalOperations.interval;

public enum MyPatterns implements Intervalable{
	Pattern1{
		public interval[] getIntervals() {return p1Intervals;}
		public long[] getLengths() {return p1Lengths;}
		public int[] getVelocities() {return p1Velocities;}
	},

	Pattern2{
		public interval[] getIntervals() {return p2Intervals;}
		public long[] getLengths() {return p2Lengths;}
		public int[] getVelocities() {return p2Velocities;}
	};

	public abstract long[] getLengths();
	public abstract int[] getVelocities();

	private static final interval[] p1Intervals = {interval.Unison, interval.PerfectFifth, interval.MajorThird,
		interval.PerfectFifth, interval.Unison, interval.MajorSixth, interval.PerfectFourth};

	private static final long[] p1Lengths = {4, 4, 2, 2, 4, 2, 2};
	private static final int[] p1Velocities = {60, 45, 50, 50, 60, 50, 50};

	private static final interval[] p2Intervals = {interval.Unison, interval.PerfectFifth, interval.MinorThird,
		interval.PerfectFifth, interval.Unison, interval.MinorSixth, interval.MinorThird};
	
	private static final long[] p2Lengths = {2, 2, 4, 4, 4, 2, 2};
	private static final int[] p2Velocities = {60, 45, 50, 50, 60, 50, 50};

}
